home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The 640 MEG Shareware Studio 2
/
The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO
/
basic
/
apb17.zip
/
ABSOLUTE.ASM
next >
Wrap
Assembly Source File
|
1990-12-20
|
720b
|
30 lines
Title Subprogram to call any absolute location in memory
Page 60,130
; Created 10-17-1987 k. murray
;
Cseg Segment byte public 'Code'
Assume Cs:Cseg,Ds:nothing,Es:nothing
;
; Define in program:
; Sub Absolute Offset% External "absolute.com"
; Call in program:
; Absolute Adr%
;
; Stack frame:
; Sp+4 Adr. of offset
; Sp+2 Return Segment
; Sp+0 Return Offset
Start:
Absolute Proc Far
Pop Ax ; Get return offset
Pop Dx ; Get return segment
Pop Bx ; Address of offset%
Push Dx
Push Ax ; put return adr. back
Push Ds:[4] ; Push current Def Seg segment
Push [Bx] ; Push Offset% value
Ret ; This will now do a far return to memory location
Absolute Endp
Cseg Ends
End Start